package com.zhida.jiyangcenter.utils

import android.widget.ImageView
import androidx.annotation.DrawableRes
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.zhida.jiyangcenter.R

fun glideIcon(iv: ImageView, url: String) {
    Glide.with(iv.context).load(url).into(iv)
}

fun glideImage(iv: ImageView, url: String, @DrawableRes placeholder: Int = R.color.colorBack) {
    Glide.with(iv.context).setDefaultRequestOptions(RequestOptions().placeholder(placeholder)).load(url).into(iv)
}

fun glideImageDefault(iv: ImageView, url: String, @DrawableRes placeholder: Int = R.color.colorBack) {
    Glide.with(iv).setDefaultRequestOptions(RequestOptions().placeholder(placeholder)).load(url).into(iv)
}